package com.sfc.sdsr.server.commands;

import com.sfc.sdsr.common.Operation;
import com.sfc.sdsr.server.ClientData;

public class CommandFactory {

	public static Command getCommand(ClientData clientData) {
		if (clientData.getOperation() == Operation.CREATE_EVENT) {
			return new CreateEvent(clientData);
		} else if (clientData.getOperation() == Operation.CREATE_MEMBER) {
			return new CreateMember(clientData);
		} else if (clientData.getOperation() == Operation.CREATE_NEWS) {
			return new CreateNews(clientData);
        } else if (clientData.getOperation() == Operation.CREATE_SONG) {
            return new CreateSong(clientData);
        } else if (clientData.getOperation() == Operation.CREATE_ADDRESS) {
            return new CreateAddress(clientData);
		} else if (clientData.getOperation() == Operation.GET_EVENTS) {
			return new GetEvents(clientData);
		} else if (clientData.getOperation() == Operation.GET_MEMBERS) {
			return new GetMembers(clientData);
		} else if (clientData.getOperation() == Operation.GET_NEWS) {
			return new GetNews(clientData);
        } else if (clientData.getOperation() == Operation.GET_SONGS) {
            return new GetSongs(clientData);
        } else if (clientData.getOperation() == Operation.GET_ADDRESSES) {
            return new GetAddresses(clientData);
		} else {
			return new UnknownCommand();
		}
	}

}
